in_kubernetes_events: Efficiently stream kubernetes events via watch#8351
in_kubernetes_events: Efficiently stream kubernetes events via watch#8351edsiper merged 3 commits intofluent:masterfrom
Conversation
14b804c to
f4093d7
Compare
|
@edsiper - just force pushed a new version of this. I still have this PR draft mode because it was branched off of 2 other PRs: #8316 & #8323. I was assuming it would be easier to review those each individually and then I'd rebase this one with a smaller set of changes to review, but if you'd prefer to just do them all in one change PR review/merge, I can move this pr to ready to review. |
f4093d7 to
8809b42
Compare
8639849 to
589a7cb
Compare
589a7cb to
9e61635
Compare
aefe2d6 to
c473bd9
Compare
|
@edsiper @patrick-stephens this didn't get merged in with 3.0 but it is ready to go. Can this be added to the next milestone/release? |
|
Did you carry out the review comments from @edsiper ? |
|
@patrick-stephens yes, unless I missed something they should all be marked resolved. I rebased and force pushed after some dependencies had a merge conflict, i think messes with the comment visibility |
|
@pwhelan do you think you can take a look at this one ? |
pwhelan
left a comment
There was a problem hiding this comment.
I have a lot of comments regarding the manner in which the events are continually processed.
|
Rebased and force pushed the following updates:
@pwhelan please take another look (posting this before CI has fully run, so i will review any test failures if they show up) |
|
appveyor and macos build errors both appear to be flakes. |
Potentially breaking change as it now requires the rbac used by fluent-bit to have 'watch'. Uses a k8s watch instead of http api polling to stream k8s events from the kube api server Signed-off-by: ryanohnemus <ryanohnemus@gmail.com>
Signed-off-by: ryanohnemus <ryanohnemus@gmail.com>
Signed-off-by: ryanohnemus <ryanohnemus@gmail.com>
|
We probably should update docs as well, particularly with the RBAC change. Could you link a docs PR @ryanohnemus ? Do we have any int tests for this btw? |
|
@patrick-stephens added doc via fluent/fluent-bit-docs#1396 No int tests, but I added unit tests for the plugin in this PR. |
Change
in_kubernetes_eventsplugin to watch kubernetes events after requesting the event list. Instead of polling for the full event list every 500ms (default), an initial full events list is requested and then is a watch is requested. The watch will create an efficient http chunked stream that will push events as they are added, modified, or deleted from the cluster. The interval_sec and interval_nsec plugin config options now act as a reconnect timer if the watch stream is ended, instead of timer to re-poll the k8s cluster.Potentially Breaking: this will require the kubernetes role used by fluent-bit to have
watchpermission in addition to the currentlistandgetpermissions.Fixes #8315
Leaving in draft as this is dependent on both #8316 & #8323, will rebase and move out of draft after those are reviewed/merged.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.